; 解决寄存器冲突的问题，将数据段的字符转化为大写
assume cs:code,ss:stack,ds:data
data segment
    db 'hello',0
    db 'world',0
    db 'AttEntIon',0
data ends
stack segment
    db 16 dup(0)
stack ends
code segment
main:
    mov ax,data
    mov ds,ax
    mov ax,stack
    mov ss,ax
    mov sp,16
    mov cx,3       ; 重复3次
    mov bx,0
    mov si,bx
s:  
    call capital
    inc si
    loop s

    mov ax,4c00h
    int 21h
capital:
    push cx
change:
    mov cl,[si]
    mov ch,0
    jcxz ok
    and byte ptr [si],11011111b
    inc si
    jmp short change
ok:
    pop cx
    ret
code ends
end main